    <div class="container">
      <div class="bg-putih">

        <div class="jdl-page">
          <?php echo isset($judul)?$judul:'<font color="#ccc">Judul Belum Diberikan</font>'; ?>
          <div class="clearfix"></div>
        </div>

        <?php echo form_open(uri_string(), array('class' => 'form-horizontal', 'role' => 'form', 'id' => 'form')); ?>
        <input type="hidden" name="KdObat" class="form-control input-sm" value="<?php echo $data['KdObat'] ?>">
        <div class="form-group">
          <label class="col-xs-2 control-label">Nama Obat</label>
          <div class="col-xs-10">
            <input type="text" name="nama" class="form-control input-sm" value="<?php echo $data['NmObat'] ?>">
          </div>
        </div>
        <div class="form-group">
          <label class="col-xs-2 control-label">Kelompok</label>
          <div class="col-xs-10">
            <script type="text/javascript">
             $(document).ready(function() {
              $("#kelompok").select2();
            });
           </script>
            <select id="kelompok" class="form-control input-sm" name="kelompok">
              <?php  
              $klpk_getter = $this->db->get('kelompok');
              $res_klpk_getter = $klpk_getter->result_array();
              foreach($res_klpk_getter as $klkpk_obat):
              ?>
              <?php if($klkpk_obat['KdKelompok'] == $data['KdKelompok']): ?>
                <option value="<?php echo $klkpk_obat['KdKelompok'] ?>" selected="selected"><?php echo $klkpk_obat['NmKelompok'] ?></option>
              <?php else: ?>
                <option value="<?php echo $klkpk_obat['KdKelompok'] ?>"><?php echo $klkpk_obat['NmKelompok'] ?></option>
              <?php endif; ?>
              <?php
              endforeach;
              ?>
            </select>
          </div>
        </div>
        <div class="form-group">
          <label class="col-xs-2 control-label">Dosis</label>
          <div class="col-xs-2">
            <input type="text" name="mindosis" class="form-control input-sm" value="<?php echo $data['MinDosis'] ?>">
          </div>
          <label class="col-xs-1 control-label"><center>s.d.</center></label>
          <div class="col-xs-2">
            <input type="text" name="maxdosis" class="form-control input-sm" value="<?php echo $data['MaxDosis'] ?>">
          </div>
          <label class="col-xs-2 control-label"><center>Satuan Dosis</center></label>
          <div class="col-xs-2">
            <input type="text" name="satuandosis" class="form-control input-sm" value="<?php echo $data['SatuanDosis'] ?>">
          </div>
        </div>
        <div class="form-group">
          <label class="col-xs-2 control-label">Satuan</label>
          <div class="col-xs-10">
            <input type="text" name="satuan" class="form-control input-sm" value="<?php echo $data['Satuan'] ?>">
          </div>
        </div>
        <div class="form-group">
          <label class="col-xs-2 control-label">Informasi</label>
          <div class="col-xs-10">
            <textarea name="informasi" id="informasi" class="form-control input-sm" rows="3"><?php echo $data['Informasi'] ?></textarea>
          </div>
        </div>
        <div class="form-group">
          <div class="col-xs-offset-2 col-xs-10">
            <button type="submit" class="btn btn-primary btn-sm">Perbaharui</button>
            <button type="reset" class="btn btn-default btn-sm">Kosongkan</button>
          </div>
        </div>
        <?php echo form_close(); ?>

        <div class="clearfix"></div>
      </div>
    </div> <!-- /container -->

    <script>
     $("#form").validate({
      rules: {
        nama: {
          required: true,
          minlength: 5
        },
        kelompok: {
          required: true         
        },
        mindosis: {
          required: true         
        },
        maxdosis: {
          required: true         
        },
        satuan: {
          required: true         
        },
        satuandosis: {
          required: true         
        },
        informasi: {
          required: true         
        }
      }
    });
   </script>